Skip to content

Conversation

@sergehuber
Copy link
Contributor

@sergehuber sergehuber commented Apr 21, 2017

Hello,

In this PR I added some documentation for the OSGi providers, as well as an example on how to use an Apache Karaf feature to package all the dependencies for the graphql-java-servlet project, making it (hopefully) easier to get started.

There is also a fix to make it more compatible with other OSGi containers, and also switched to OSGi R6 servlet registration patterns.

Let me know if you need any changes.
Best regards,
Serge...

- Renaming the root query and mutation types from "query" and "mutation" to "Query" and "Mutation" to follow object type naming conventions
- Modified the GraphQLQueryProvider implementation to make the old API deprecated and replace with a collection of field definitions, making this aligned with the GraphQLMutationProvider interface. This makes it possible to define data fetcher for the root object type fields.
- Added JavaDoc documentation to the GraphQLQueryProvider interface
- Modify tests to use new field definition method
… well as provide an example of a GraphQL provider
@apottere
Copy link
Contributor

I like the idea, but it might be better to put it in an examples/apache-karaf directory instead of putting the file contents directly in the README. You could then link from the documentation in the readme to the files in the examples directory.

@sergehuber
Copy link
Contributor Author

Ok should we create this examples directory then ?

The problem is that the plugin I need only works with Maven, so I'm not sure how to do this.

@apottere
Copy link
Contributor

I just created it: fb1a37e

You can add a subdirectory for your sample and make it as robust as you think it should be - you can make it a maven project and it won't affect the servlet project.

@sergehuber sergehuber changed the title Added some documentation for OSGi Added some documentation for OSGi & Fix another OSGi deployment issue Apr 24, 2017
@sergehuber
Copy link
Contributor Author

Ok I've completed all the examples I wanted to provide and updated the README accordingly. I also added a fix for the servlet registration in some (older) OSGi containers.

The new examples contain a fully running Apache Karaf server package (no binaries, this is generated using a Maven Plugin), that will let users have everything in a single package to get up and running experimenting with GraphQL & OSGi. I've also provided a simple ExampleGraphQLProvider that help see a concrete example.

Let me know what you think !

@apottere
Copy link
Contributor

apottere commented Apr 24, 2017

Wow, this is awesome. Nice work!

@apottere apottere merged commit c6b6a45 into graphql-java-kickstart:master Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants